package com.allen.workflow;

import com.allen.workflow.delegate.BusinessExecution;
import com.allen.workflow.listener.task.WorkTask;
import lombok.extern.slf4j.Slf4j;

/**
 * @Author 王蒙
 * @Date 2024/3/25 16:06
 * @Version 1.0
 */
@Slf4j
public class WfLogUtils {

    private WfLogUtils() {
    }

    public static void printLog(String name, WorkTask delegateTask) {
        log.info(name + " processInstanceId:{}, taskId:{}", delegateTask.getDelegateTask().getProcessInstanceId(), delegateTask.getTaskId());
    }


    public static void printLog(String name, BusinessExecution delegateTask) {
        log.info(name + " processInstanceId:{}, taskId:{}", delegateTask.getProcessInstanceId(), delegateTask.getDelegateExecution().getId());
    }
}
